<?php
//include the functions.php
require "include/functions.php";
session_start();

?>
<script type="text/javascript" language="JavaScript">

function Register()
{

if ((document.Data.myusername.value != '') && (document.Data.mypassword.value != '') && (document.Data.firstname.value != '') && (document.Data.lastname.value != '') && (document.Data.address.value != '') && 
	(document.Data.email.value != '') && (document.Data.security_code.value != ''))
	{
		document.Data.submit();	
	}
	else
	{
		alert ('Please fill all the field');
		document.form1.myusername.focus();
	}
}

</script>

<html>
<head>
<title>Home Electronics - New user page</title>
<link rel="stylesheet" href="include/styles.css" type="text/css">
</head>
<body>
<div id="container" align="center">
   <div id="header">
		<div id="topmenu"><ul><?php top_menu(); ?></ul></div> 
		<div id="menu" align="right">
		<form name="form1" method="post" action="search.php">
		<tr>
		<td height="35" width="78"><a>Search Products</a></td>
		<td height="35" width="3">:</td>
		<td height="35" width="294"><input name="mysearch" type="text" id="mysearch">&nbsp;&nbsp;&nbsp;</td>
		</tr>
		</form>
		</div>
		<div id="menubar"> <!-- Menu buttons -->
  		<ul>
   		<li><a href="index.php" title="Home"><span>Home</span></a></li>
	    <li><a href="#" title="Computing"><span>Computing</span></a></li>
		<li><a href="#" title="Kitchen"><span>Kitchen</span></a></li>
		<li><a href="#" title="Bathroom"><span>Bathroom</span></a></li>
		<li><a href="#" title="Laundry"><span>Laundry</span></a></li>
		<li><a href="#" title="Furniture and Bedding"><span>Furniture & Bedding</span></a></li>
    	</ul>
		</div>
	</div> <!-- Header -->

	
	<div id="body" align="center">
		<div id="page">
<table width="300" border="0" align="center" cellpadding="0" cellspacing="1" bgcolor="#CCCCCC">
<tr>
<form name="Data" method="post" action="create_user.php">

<td>
<table width="100%" border="0" cellpadding="3" cellspacing="1" bgcolor="#FFFFFF">
<tr>
<td colspan="3" align="center"><strong>Create New User</strong></td>
</tr>
<tr>
<td width="78">Username </td>
<td width="20">: </td>
<td width="245"><input name="myusername" type="text"/>
</td>
</tr>
<tr>
<td>Password </td>
<td>: </td>
<td><input name="mypassword" type="password"/></td>
</tr>
<tr>
<td>First Name </td>
<td>: </td>
<td><input name="firstname" type="text" /></td>
</tr>
<tr>
<td>Last Name </td>
<td>: </td>
<td><input name="lastname" type="text"/></td>
</tr>
<tr>
<td>Address </td>
<td>: </td>
<td><input name="address" type="text"/></td>
</tr>
<tr>
<td>Email</td>
<td>: </td>
<td><input name="email" type="text"/></td>
</tr>
<tr>
<td>Security Code</td>
<td>: </td>
<td><img src="include/capcha.php"/>
	<input name="security_code" type="text" id="security_code"/></td>
</tr>
<tr>
<td>&nbsp;</td>
<td>&nbsp;</td>
<td><input type="button" name="Submit" value="Register" onClick="Javascript:Register();"/>&nbsp;&nbsp;&nbsp;</td>
</td>
</tr>
</table>
</td>
</form>
</tr>
</table>
		</div>
	</div> <!--body div -->
   		
   <? footer(); ?>
</div>
</body>
</html>

